class Solution:
    def findErrorNums(self, nums: List[int]) -> List[int]:
        correctSum = len(nums) * (len(nums) + 1) // 2
        errorSum = sum(nums)
        noRepeatSum = sum(set(nums))

        return [errorSum - noRepeatSum, correctSum - noRepeatSum]
